home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Tcl-Tk 8.0 / Pre-installed version / tcl8.0 / unix / Makefile.in < prev    next >
Encoding:
Makefile  |  1997-08-15  |  32.7 KB  |  995 lines  |  [TEXT/ALFA]

  1. #
  2. # This file is a Makefile for Tcl.  If it has the name "Makefile.in"
  3. # then it is a template for a Makefile;  to generate the actual Makefile,
  4. # run "./configure", which is a configuration script generated by the
  5. # "autoconf" program (constructs like "@foo@" will get replaced in the
  6. # actual Makefile.
  7. #
  8. # SCCS: @(#) Makefile.in 1.187 97/08/15 10:23:55
  9.  
  10. # Current Tcl version;  used in various names.
  11.  
  12. VERSION = @TCL_VERSION@
  13.  
  14. #----------------------------------------------------------------
  15. # Things you can change to personalize the Makefile for your own
  16. # site (you can make these changes in either Makefile.in or
  17. # Makefile, but changes to Makefile will get lost if you re-run
  18. # the configuration script).
  19. #----------------------------------------------------------------
  20.  
  21. # Default top-level directories in which to install architecture-
  22. # specific files (exec_prefix) and machine-independent files such
  23. # as scripts (prefix).  The values specified here may be overridden
  24. # at configure-time with the --exec-prefix and --prefix options
  25. # to the "configure" script.
  26.  
  27. prefix =    @prefix@
  28. exec_prefix =    @exec_prefix@
  29.  
  30. # The following definition can be set to non-null for special systems
  31. # like AFS with replication.  It allows the pathnames used for installation
  32. # to be different than those used for actually reference files at
  33. # run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
  34. # when installing files.
  35. INSTALL_ROOT =
  36.  
  37. # Directory from which applications will reference the library of Tcl
  38. # scripts (note: you can set the TCL_LIBRARY environment variable at
  39. # run-time to override this value):
  40. TCL_LIBRARY =    $(prefix)/lib/tcl$(VERSION)
  41.  
  42. # Package search path.
  43. TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
  44.  
  45. # Path name to use when installing library scripts:
  46. SCRIPT_INSTALL_DIR =    $(INSTALL_ROOT)$(TCL_LIBRARY)
  47.  
  48. # Directory in which to install libtcl.so or libtcl.a:
  49. LIB_INSTALL_DIR =    $(INSTALL_ROOT)$(exec_prefix)/lib
  50.  
  51. # Path to use at runtime to refer to LIB_INSTALL_DIR:
  52. LIB_RUNTIME_DIR =    $(exec_prefix)/lib
  53.  
  54. # Directory in which to install the program tclsh:
  55. BIN_INSTALL_DIR =    $(INSTALL_ROOT)$(exec_prefix)/bin
  56.  
  57. # Directory in which to install the include file tcl.h:
  58. INCLUDE_INSTALL_DIR =    $(INSTALL_ROOT)$(prefix)/include
  59.  
  60. # Top-level directory in which to install manual entries:
  61. MAN_INSTALL_DIR =    $(INSTALL_ROOT)$(prefix)/man
  62.  
  63. # Directory in which to install manual entry for tclsh:
  64. MAN1_INSTALL_DIR =    $(MAN_INSTALL_DIR)/man1
  65.  
  66. # Directory in which to install manual entries for Tcl's C library
  67. # procedures:
  68. MAN3_INSTALL_DIR =    $(MAN_INSTALL_DIR)/man3
  69.  
  70. # Directory in which to install manual entries for the built-in
  71. # Tcl commands:
  72. MANN_INSTALL_DIR =    $(MAN_INSTALL_DIR)/mann
  73.  
  74. # To change the compiler switches, for example to change from -O
  75. # to -g, change the following line:
  76. # On systems where both getcwd(3) and getwd(3) exist, check the man
  77. # page and if getcwd, like on Solaris, uses popen to pwd(1)
  78. # add -DUSEGETWD to the flags so getwd will be used instead.
  79. CFLAGS = -O
  80. # Solaris recommended:
  81. #CFLAGS = -O -DUSEGETWD
  82.  
  83. # To disable ANSI-C procedure prototypes reverse the comment characters
  84. # on the following lines:
  85. PROTO_FLAGS =
  86. #PROTO_FLAGS = -DNO_PROTOTYPE
  87.  
  88. # Mathematical functions like sin and atan2 are enabled for expressions
  89. # by default.  To disable them, reverse the comment characters on the
  90. # following pairs of lines:
  91. MATH_FLAGS =
  92. #MATH_FLAGS = -DTCL_NO_MATH
  93. MATH_LIBS = @MATH_LIBS@
  94. #MATH_LIBS =
  95.  
  96. # If you use the setenv, putenv, or unsetenv procedures to modify
  97. # environment variables in your application and you'd like those
  98. # modifications to appear in the "env" Tcl variable, switch the
  99. # comments on the two lines below so that Tcl provides these
  100. # procedures instead of your standard C library.
  101.  
  102. ENV_FLAGS =
  103. #ENV_FLAGS = -DTclSetEnv=setenv -DTcl_PutEnv=putenv -DTclUnsetEnv=unsetenv
  104.  
  105. # To compile for non-UNIX systems (so that only the non-UNIX-specific
  106. # commands are available), reverse the comment characters on the
  107. # following pairs of lines.  In addition, you'll have to provide your
  108. # own replacement for the "panic" procedure (see panic.c for what
  109. # the current one does).
  110. GENERIC_FLAGS =
  111. #GENERIC_FLAGS = -DTCL_GENERIC_ONLY
  112. UNIX_OBJS = tclMtherr.o tclUnixChan.o tclUnixEvent.o tclUnixFCmd.o \
  113.     tclUnixFile.o tclUnixPipe.o tclUnixSock.o \
  114.     tclUnixTime.o tclUnixInit.o
  115. #UNIX_OBJS =
  116. NOTIFY_OBJS = tclUnixNotfy.o
  117. #NOTIFY_OBJS =
  118.  
  119. # To enable memory debugging reverse the comment characters on the following
  120. # lines.  Warning:  if you enable memory debugging, you must do it
  121. # *everywhere*, including all the code that calls Tcl, and you must use
  122. # ckalloc and ckfree everywhere instead of malloc and free.
  123. MEM_DEBUG_FLAGS =
  124. #MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG
  125.  
  126. # To enable compilation debugging reverse the comment characters on
  127. # one of the following lines.
  128. COMPILE_DEBUG_FLAGS =
  129. #COMPILE_DEBUG_FLAGS = -DTCL_COMPILE_STATS
  130. #COMPILE_DEBUG_FLAGS = -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS
  131.  
  132. # Some versions of make, like SGI's, use the following variable to
  133. # determine which shell to use for executing commands:
  134. SHELL =        /bin/sh
  135.  
  136. # Tcl used to let the configure script choose which program to use
  137. # for installing, but there are just too many different versions of
  138. # "install" around;  better to use the install-sh script that comes
  139. # with the distribution, which is slower but guaranteed to work.
  140.  
  141. INSTALL =        @srcdir@/install-sh -c
  142. INSTALL_PROGRAM =    ${INSTALL}
  143. INSTALL_DATA =        ${INSTALL} -m 644
  144.  
  145. # The following symbol defines additional compiler flags to enable
  146. # Tcl itself to be a shared library.  If Tcl isn't going to be a
  147. # shared library then the symbol has an empty definition.
  148.  
  149. TCL_SHLIB_CFLAGS = @TCL_SHLIB_CFLAGS@
  150. #TCL_SHLIB_CFLAGS =
  151.  
  152. # The symbols below provide support for dynamic loading and shared
  153. # libraries.  See configure.in for a description of what the
  154. # symbols mean.  The values of the symbols are normally set by the
  155. # configure script.  You shouldn't normally need to modify any of
  156. # these definitions by hand.
  157.  
  158. SHLIB_LD = @SHLIB_LD@
  159.  
  160. SHLIB_SUFFIX = @SHLIB_SUFFIX@
  161. #SHLIB_SUFFIX =
  162.  
  163. DLTEST_TARGETS = dltest/pkg5${SHLIB_SUFFIX} dltest/Makefile
  164.  
  165. # The following symbol is defined to "$(DLTEST_TARGETS)" if dynamic
  166. # loading is available;  this causes everything in the "dltest"
  167. # subdirectory to be built when making "tcltest.  If dynamic loading
  168. # isn't available, configure defines this symbol to an empty string,
  169. # in which case the shared libraries aren't built.
  170. BUILD_DLTEST = @BUILD_DLTEST@
  171. #BUILD_DLTEST =
  172.  
  173. TCL_LIB_FILE = @TCL_LIB_FILE@
  174. #TCL_LIB_FILE = libtcl.a
  175.  
  176. #----------------------------------------------------------------
  177. # The information below is modified by the configure script when
  178. # Makefile is generated from Makefile.in.  You shouldn't normally
  179. # modify any of this stuff by hand.
  180. #----------------------------------------------------------------
  181.  
  182. COMPAT_OBJS =        @LIBOBJS@
  183.  
  184. AC_FLAGS =        @DEFS@
  185. RANLIB =        @RANLIB@
  186. SRC_DIR =        @srcdir@
  187. TOP_DIR =        @srcdir@/..
  188. GENERIC_DIR =         $(TOP_DIR)/generic
  189. COMPAT_DIR =        $(TOP_DIR)/compat
  190. TOOL_DIR =        $(TOP_DIR)/tools
  191. DLTEST_DIR =        @srcdir@/dltest
  192. UNIX_DIR =         @srcdir@
  193. CC =            @CC@
  194.  
  195. #----------------------------------------------------------------
  196. # The information below should be usable as is.  The configure
  197. # script won't modify it and you shouldn't need to modify it
  198. # either.
  199. #----------------------------------------------------------------
  200.  
  201.  
  202. CC_SWITCHES =    ${CFLAGS} ${TCL_SHLIB_CFLAGS} -I${GENERIC_DIR} -I${SRC_DIR} \
  203. ${AC_FLAGS} ${MATH_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \
  204. ${COMPILE_DEBUG_FLAGS} ${ENV_FLAGS} -DTCL_SHLIB_EXT=\"${SHLIB_SUFFIX}\"
  205.  
  206. LIBS =        @DL_LIBS@ @LIBS@ $(MATH_LIBS) -lc
  207.  
  208. DEPEND_SWITCHES = ${CFLAGS} -I${GENERIC_DIR} -I${SRC_DIR} \
  209. ${AC_FLAGS} ${MATH_FLAGS} \
  210. ${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \
  211. -DTCL_SHLIB_EXT=\"${SHLIB_SUFFIX}\"
  212.  
  213. TCLSH_OBJS = tclAppInit.o
  214.  
  215. TCLTEST_OBJS = tclTestInit.o tclTest.o tclTestObj.o tclUnixTest.o
  216.  
  217. XTTEST_OBJS = tclTest.o tclTestObj.o tclUnixTest.o tclXtNotify.o \
  218.     tclXtTest.o xtTestInit.o
  219.  
  220. GENERIC_OBJS = panic.o regexp.o tclAsync.o tclBasic.o tclBinary.o tclCkalloc.o \
  221.     tclClock.o tclCmdAH.o tclCmdIL.o tclCmdMZ.o tclCompExpr.o \
  222.     tclCompile.o tclDate.o tclEnv.o tclEvent.o tclExecute.o \
  223.     tclFCmd.o tclFileName.o tclGet.o tclHash.o tclHistory.o \
  224.     tclIndexObj.o tclInterp.o tclIO.o tclIOCmd.o tclIOSock.o \
  225.     tclIOUtil.o tclLink.o tclListObj.o tclLoad.o tclMain.o tclNamesp.o \
  226.     tclNotify.o tclObj.o tclParse.o tclPipe.o tclPkg.o tclPosixStr.o \
  227.     tclPreserve.o tclProc.o tclStringObj.o tclTimer.o tclUtil.o tclVar.o
  228.  
  229. OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${NOTIFY_OBJS} ${COMPAT_OBJS} @DL_OBJS@
  230.  
  231. GENERIC_HDRS = \
  232.     $(GENERIC_DIR)/tclRegexp.h \
  233.     $(GENERIC_DIR)/tcl.h \
  234.     $(GENERIC_DIR)/tclInt.h \
  235.     $(GENERIC_DIR)/tclPort.h \
  236.     $(GENERIC_DIR)/tclPatch.h
  237.  
  238. GENERIC_SRCS = \
  239.     $(GENERIC_DIR)/regexp.c \
  240.     $(GENERIC_DIR)/tclAsync.c \
  241.     $(GENERIC_DIR)/tclBasic.c \
  242.     $(GENERIC_DIR)/tclBinary.c \
  243.     $(GENERIC_DIR)/tclCkalloc.c \
  244.     $(GENERIC_DIR)/tclClock.c \
  245.     $(GENERIC_DIR)/tclCmdAH.c \
  246.     $(GENERIC_DIR)/tclCmdIL.c \
  247.     $(GENERIC_DIR)/tclCmdMZ.c \
  248.     $(GENERIC_DIR)/tclCompExpr.c \
  249.     $(GENERIC_DIR)/tclCompile.c \
  250.     $(GENERIC_DIR)/tclDate.c \
  251.     $(GENERIC_DIR)/tclEnv.c \
  252.     $(GENERIC_DIR)/tclEvent.c \
  253.     $(GENERIC_DIR)/tclExecute.c \
  254.     $(GENERIC_DIR)/tclFCmd.c \
  255.     $(GENERIC_DIR)/tclFileName.c \
  256.     $(GENERIC_DIR)/tclGet.c \
  257.     $(GENERIC_DIR)/tclHash.c \
  258.     $(GENERIC_DIR)/tclHistory.c \
  259.     $(GENERIC_DIR)/tclIndexObj.c \
  260.     $(GENERIC_DIR)/tclInterp.c \
  261.     $(GENERIC_DIR)/tclIO.c \
  262.     $(GENERIC_DIR)/tclIOCmd.c \
  263.     $(GENERIC_DIR)/tclIOSock.c \
  264.     $(GENERIC_DIR)/tclIOUtil.c \
  265.     $(GENERIC_DIR)/tclLink.c \
  266.     $(GENERIC_DIR)/tclListObj.c \
  267.     $(GENERIC_DIR)/tclLoad.c \
  268.     $(GENERIC_DIR)/tclMain.c \
  269.     $(GENERIC_DIR)/tclNamesp.c \
  270.     $(GENERIC_DIR)/tclNotify.c \
  271.     $(GENERIC_DIR)/tclObj.c \
  272.         $(GENERIC_DIR)/tclParse.c \
  273.     $(GENERIC_DIR)/tclPipe.c \
  274.     $(GENERIC_DIR)/tclPkg.c \
  275.     $(GENERIC_DIR)/tclPosixStr.c \
  276.     $(GENERIC_DIR)/tclPreserve.c \
  277.     $(GENERIC_DIR)/tclProc.c \
  278.     $(GENERIC_DIR)/tclStringObj.c \
  279.     $(GENERIC_DIR)/tclTest.c \
  280.     $(GENERIC_DIR)/tclTestObj.c \
  281.     $(GENERIC_DIR)/tclTimer.c \
  282.     $(GENERIC_DIR)/tclUtil.c \
  283.     $(GENERIC_DIR)/tclVar.c
  284.  
  285. UNIX_HDRS = \
  286.     $(UNIX_DIR)/tclUnixPort.h
  287.  
  288. UNIX_SRCS = \
  289.     $(UNIX_DIR)/tclAppInit.c \
  290.     $(UNIX_DIR)/tclMtherr.c \
  291.     $(UNIX_DIR)/tclUnixChan.c \
  292.     $(UNIX_DIR)/tclUnixEvent.c \
  293.     $(UNIX_DIR)/tclUnixFCmd.c \
  294.     $(UNIX_DIR)/tclUnixFile.c \
  295.     $(UNIX_DIR)/tclUnixNotfy.c \
  296.     $(UNIX_DIR)/tclUnixPipe.c \
  297.     $(UNIX_DIR)/tclUnixSock.c \
  298.     $(UNIX_DIR)/tclUnixTest.c \
  299.     $(UNIX_DIR)/tclUnixTime.c \
  300.     $(UNIX_DIR)/tclUnixInit.c
  301.  
  302. DL_SRCS = \
  303.     $(UNIX_DIR)/tclLoadAix.c \
  304.     $(UNIX_DIR)/tclLoadAout.c \
  305.     $(UNIX_DIR)/tclLoadDl.c \
  306.     $(UNIX_DIR)/tclLoadDl2.c \
  307.     $(UNIX_DIR)/tclLoadDld.c \
  308.     $(GENERIC_DIR)/tclLoadNone.c \
  309.     $(UNIX_DIR)/tclLoadOSF.c \
  310.     $(UNIX_DIR)/tclLoadShl.c
  311.  
  312. # Note: don't include DL_SRCS in SRCS:  most of those files won't
  313. # compile on the current machine, and they will cause problems for
  314. # things like "make depend".
  315.  
  316. SRCS = $(GENERIC_SRCS) $(UNIX_SRCS)
  317.  
  318. all: ${TCL_LIB_FILE} tclsh
  319.  
  320. # The following target is configured by autoconf to generate either
  321. # a shared library or non-shared library for Tcl.
  322. ${TCL_LIB_FILE}: ${OBJS}
  323.     rm -f ${TCL_LIB_FILE}
  324.     @MAKE_LIB@
  325.     $(RANLIB) ${TCL_LIB_FILE}
  326.  
  327. # Make target which outputs the list of the .o contained in the Tcl lib
  328. # usefull to build a single big shared library containing Tcl and other
  329. # extensions.  used for the Tcl Plugin.  -- dl
  330. # The dependency on OBJS is not there because we just want the list
  331. # of objects here, not actually building them
  332. tclLibObjs:
  333.     @echo ${OBJS}
  334. # This targets actually build the objects needed for the lib in the above
  335. # case
  336. objs: ${OBJS}
  337.  
  338.  
  339. tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE}
  340.     ${CC} @LD_FLAGS@ ${TCLSH_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} \
  341.         @TCL_LD_SEARCH_FLAGS@ -o tclsh
  342.  
  343. tcltest: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${BUILD_DLTEST}
  344.     ${CC} @LD_FLAGS@ ${TCLTEST_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} \
  345.         @TCL_LD_SEARCH_FLAGS@ -o tcltest
  346.  
  347. xttest:  ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} \
  348.     @DL_OBJS@ ${BUILD_DLTEST}
  349.     ${CC} ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} \
  350.         @DL_OBJS@ @TCL_BUILD_LIB_SPEC@ ${LIBS} \
  351.         @TCL_LD_SEARCH_FLAGS@ -lXt -o xttest
  352.  
  353.  
  354. # Note, in the target below TCL_LIBRARY needs to be set or else
  355. # "make test" won't work in the case where the compilation directory
  356. # isn't the same as the source directory.
  357.  
  358. test: tcltest
  359.     LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH; \
  360.     TCL_LIBRARY=${TOP_DIR}/library; export TCL_LIBRARY; \
  361.     ( echo cd $(TOP_DIR)/tests\; source all ) | ./tcltest
  362.  
  363. # Useful target to launch a built tcltest with the proper path,...
  364. runtest:
  365.     LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH; \
  366.     TCL_LIBRARY=${TOP_DIR}/library; export TCL_LIBRARY; \
  367.     ./tcltest
  368.  
  369. # The following target outputs the name of the top-level source directory
  370. # for Tcl (it is used by Tk's configure script, for example).  The
  371. # .NO_PARALLEL line is needed to avoid problems under Sun's "pmake".
  372. # Note: this target is now obsolete (use the autoconf variable
  373. # TCL_SRC_DIR from tclConfig.sh instead).
  374.  
  375. .NO_PARALLEL: topDirName
  376. topDirName:
  377.     @cd $(TOP_DIR); pwd
  378.  
  379. # The following target generates the file generic/tclDate.c 
  380. # from the yacc grammar found in generic/tclGetDate.y.  This is
  381. # only run by hand as yacc is not available in all environments.
  382. # The name of the .c file is different than the name of the .y file
  383. # so that make doesn't try to automatically regenerate the .c file.
  384.  
  385. gendate:
  386.     yacc -l $(GENERIC_DIR)/tclGetDate.y
  387.     sed -e 's/yy/TclDate/g' -e '/^#include <values.h>/d' \
  388.         -e 's/SCCSID/%Z\% %M\% %I\% %E\% %U\%/g' \
  389.         -e '/#ifdef __STDC__/,/#endif/d' -e '/TclDateerrlab:/d' \
  390.         -e '/TclDatenewstate:/d' -e '/#pragma/d' \
  391.         <y.tab.c >$(GENERIC_DIR)/tclDate.c
  392.     rm y.tab.c
  393.  
  394. # The following targets generate the shared libraries in dltest that
  395. # are used for testing;  they are included as part of the "tcltest"
  396. # target (via the BUILD_DLTEST variable) if dynamic loading is supported
  397. # on this platform. The ".." environment variable stuff is needed
  398. # because on some platforms tclsh scripts will be executed as part of
  399. # building the shared libraries, and they need to be able to use the
  400. # uninstalled tclsh that is present in this directory.  The "make tclsh"
  401. # command is needed for the same reason (must make sure that it exists).
  402.  
  403. dltest/pkg5${SHLIB_SUFFIX}: dltest/Makefile
  404.     if test ! -f tclsh; then $(MAKE) tclsh; else true; fi
  405.     cd dltest; PATH=..:${PATH} TCL_LIBRARY=../../library $(MAKE)
  406.  
  407. dltest/Makefile: $(DLTEST_DIR)/configure $(DLTEST_DIR)/Makefile.in tclConfig.sh
  408.     if test ! -d dltest; then mkdir dltest; else true; fi
  409.     cd dltest; if test -f configure; then ./configure; else \
  410.         $(DLTEST_DIR)/configure; fi
  411.  
  412. install: install-binaries install-libraries install-man
  413.  
  414. # Note: before running ranlib below, must cd to target directory because
  415. # some ranlibs write to current directory, and this might not always be
  416. # possible (e.g. if installing as root).
  417.  
  418. install-binaries: $(TCL_LIB_FILE) tclsh
  419.     @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
  420.         do \
  421.         if [ ! -d $$i ] ; then \
  422.         echo "Making directory $$i"; \
  423.         mkdir $$i; \
  424.         chmod 755 $$i; \
  425.         else true; \
  426.         fi; \
  427.         done;
  428.     @echo "Installing $(TCL_LIB_FILE)"
  429.     @$(INSTALL_DATA) $(TCL_LIB_FILE) $(LIB_INSTALL_DIR)/$(TCL_LIB_FILE)
  430.     @(cd $(LIB_INSTALL_DIR); $(RANLIB) $(TCL_LIB_FILE))
  431.     @chmod 555 $(LIB_INSTALL_DIR)/$(TCL_LIB_FILE)
  432.     @echo "Installing tclsh"
  433.     @$(INSTALL_PROGRAM) tclsh $(BIN_INSTALL_DIR)/tclsh$(VERSION)
  434.     @echo "Installing tclConfig.sh"
  435.     @$(INSTALL_DATA) tclConfig.sh $(LIB_INSTALL_DIR)/tclConfig.sh
  436.  
  437. install-libraries:
  438.     @for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \
  439.         $(SCRIPT_INSTALL_DIR); \
  440.         do \
  441.         if [ ! -d $$i ] ; then \
  442.         echo "Making directory $$i"; \
  443.         mkdir $$i; \
  444.         chmod 755 $$i; \
  445.         else true; \
  446.         fi; \
  447.         done;
  448.     @for i in http2.0 http1.0 opt0.1; \
  449.         do \
  450.         if [ ! -d $(SCRIPT_INSTALL_DIR)/$$i ] ; then \
  451.         echo "Making directory $(SCRIPT_INSTALL_DIR)/$$i"; \
  452.         mkdir $(SCRIPT_INSTALL_DIR)/$$i; \
  453.         chmod 755 $(SCRIPT_INSTALL_DIR)/$$i; \
  454.         else true; \
  455.         fi; \
  456.         done;
  457.     @echo "Installing tcl.h"
  458.     @$(INSTALL_DATA) $(GENERIC_DIR)/tcl.h $(INCLUDE_INSTALL_DIR)/tcl.h
  459.     @for i in $(TOP_DIR)/library/*.tcl $(TOP_DIR)/library/tclIndex $(UNIX_DIR)/tclAppInit.c $(UNIX_DIR)/ldAix; \
  460.         do \
  461.         echo "Installing $$i"; \
  462.         $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \
  463.         done;
  464.     @for i in http2.0 http1.0 opt0.1; \
  465.         do \
  466.         for j in $(TOP_DIR)/library/$$i/*.tcl ; \
  467.         do \
  468.         echo "Installing $$j"; \
  469.         $(INSTALL_DATA) $$j $(SCRIPT_INSTALL_DIR)/$$i; \
  470.         done; \
  471.         done;
  472.  
  473. install-man:
  474.     @for i in $(MAN_INSTALL_DIR) $(MAN1_INSTALL_DIR) $(MAN3_INSTALL_DIR) $(MANN_INSTALL_DIR) ; \
  475.         do \
  476.         if [ ! -d $$i ] ; then \
  477.         echo "Making directory $$i"; \
  478.         mkdir $$i; \
  479.         chmod 755 $$i; \
  480.         else true; \
  481.         fi; \
  482.         done;
  483.     @cd $(TOP_DIR)/doc; for i in *.1; \
  484.         do \
  485.         echo "Installing doc/$$i"; \
  486.         rm -f $(MAN1_INSTALL_DIR)/$$i; \
  487.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  488.             $$i > $(MAN1_INSTALL_DIR)/$$i; \
  489.         chmod 444 $(MAN1_INSTALL_DIR)/$$i; \
  490.         done;
  491.     $(UNIX_DIR)/mkLinks $(MAN1_INSTALL_DIR)
  492.     @cd $(TOP_DIR)/doc; for i in *.3; \
  493.         do \
  494.         echo "Installing doc/$$i"; \
  495.         rm -f $(MAN3_INSTALL_DIR)/$$i; \
  496.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  497.             $$i > $(MAN3_INSTALL_DIR)/$$i; \
  498.         chmod 444 $(MAN3_INSTALL_DIR)/$$i; \
  499.         done;
  500.     $(UNIX_DIR)/mkLinks $(MAN3_INSTALL_DIR)
  501.     @cd $(TOP_DIR)/doc; for i in *.n; \
  502.         do \
  503.         echo "Installing doc/$$i"; \
  504.         rm -f $(MANN_INSTALL_DIR)/$$i; \
  505.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  506.             $$i > $(MANN_INSTALL_DIR)/$$i; \
  507.         chmod 444 $(MANN_INSTALL_DIR)/$$i; \
  508.         done;
  509.     $(UNIX_DIR)/mkLinks $(MANN_INSTALL_DIR)
  510.  
  511. Makefile: $(UNIX_DIR)/Makefile.in
  512.     $(SHELL) config.status
  513.  
  514. clean:
  515.     rm -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \
  516.         errors tclsh tcltest lib.exp
  517.     if test -f dltest/Makefile; then cd dltest; $(MAKE) clean; fi
  518.  
  519. distclean: clean
  520.     rm -rf Makefile config.status config.cache config.log tclConfig.sh \
  521.         SUNWtcl.* prototype
  522.     if test -f dltest/Makefile; then cd dltest; $(MAKE) distclean; fi
  523.  
  524. depend:
  525.     makedepend -- $(DEPEND_SWITCHES) -- $(SRCS)
  526.  
  527. bp: $(UNIX_DIR)/bp.c
  528.     $(CC) $(CC_SWITCHES) $(UNIX_DIR)/bp.c -o bp
  529.  
  530. # Test binaries.  The rules for tclTestInit.o and xtTestInit.o are
  531. # complicated because they are compiled from tclAppInit.c.  Can't use
  532. # the "-o" option because this doesn't work on some strange compilers
  533. # (e.g. UnixWare).
  534.  
  535. tclTestInit.o: $(UNIX_DIR)/tclAppInit.c
  536.     @if test -f tclAppInit.o ; then \
  537.         rm -f tclAppInit.sav; \
  538.         mv tclAppInit.o tclAppInit.sav; \
  539.     fi;
  540.     $(CC) -c $(CC_SWITCHES) -DTCL_TEST $(UNIX_DIR)/tclAppInit.c
  541.     rm -f tclTestInit.o
  542.     mv tclAppInit.o tclTestInit.o
  543.     @if test -f tclAppInit.sav ; then \
  544.         mv tclAppInit.sav tclAppInit.o; \
  545.     fi;
  546.  
  547. xtTestInit.o: $(UNIX_DIR)/tclAppInit.c
  548.     @if test -f tclAppInit.o ; then \
  549.         rm -f tclAppInit.sav; \
  550.         mv tclAppInit.o tclAppInit.sav; \
  551.     fi;
  552.     $(CC) -c $(CC_SWITCHES) -DTCL_TEST -DTCL_XT_TEST \
  553.         $(UNIX_DIR)/tclAppInit.c
  554.     rm -f xtTestInit.o
  555.     mv tclAppInit.o xtTestInit.o
  556.     @if test -f tclAppInit.sav ; then \
  557.         mv tclAppInit.sav tclAppInit.o; \
  558.     fi;
  559.  
  560. # Object files used on all Unix systems:
  561.  
  562. panic.o: $(GENERIC_DIR)/panic.c
  563.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/panic.c
  564.  
  565. regexp.o: $(GENERIC_DIR)/regexp.c
  566.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/regexp.c
  567.  
  568. tclAppInit.o: $(UNIX_DIR)/tclAppInit.c
  569.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclAppInit.c
  570.  
  571. tclAsync.o: $(GENERIC_DIR)/tclAsync.c
  572.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclAsync.c
  573.  
  574. tclBasic.o: $(GENERIC_DIR)/tclBasic.c
  575.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclBasic.c
  576.  
  577. tclBinary.o: $(GENERIC_DIR)/tclBinary.c
  578.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclBinary.c
  579.  
  580. tclCkalloc.o: $(GENERIC_DIR)/tclCkalloc.c
  581.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclCkalloc.c
  582.  
  583. tclClock.o: $(GENERIC_DIR)/tclClock.c
  584.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclClock.c
  585.  
  586. tclCmdAH.o: $(GENERIC_DIR)/tclCmdAH.c
  587.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclCmdAH.c
  588.  
  589. tclCmdIL.o: $(GENERIC_DIR)/tclCmdIL.c
  590.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclCmdIL.c
  591.  
  592. tclCmdMZ.o: $(GENERIC_DIR)/tclCmdMZ.c
  593.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclCmdMZ.c
  594.  
  595. tclDate.o: $(GENERIC_DIR)/tclDate.c
  596.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclDate.c
  597.  
  598. tclCompExpr.o: $(GENERIC_DIR)/tclCompExpr.c
  599.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclCompExpr.c
  600.  
  601. tclCompile.o: $(GENERIC_DIR)/tclCompile.c
  602.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclCompile.c
  603.  
  604. tclEnv.o: $(GENERIC_DIR)/tclEnv.c
  605.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclEnv.c
  606.  
  607. tclEvent.o: $(GENERIC_DIR)/tclEvent.c
  608.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclEvent.c
  609.  
  610. tclExecute.o: $(GENERIC_DIR)/tclExecute.c
  611.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclExecute.c
  612.  
  613. tclFCmd.o: $(GENERIC_DIR)/tclFCmd.c
  614.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclFCmd.c
  615.  
  616. tclFileName.o: $(GENERIC_DIR)/tclFileName.c
  617.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclFileName.c
  618.  
  619. tclGet.o: $(GENERIC_DIR)/tclGet.c
  620.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclGet.c
  621.  
  622. tclHash.o: $(GENERIC_DIR)/tclHash.c
  623.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclHash.c
  624.  
  625. tclHistory.o: $(GENERIC_DIR)/tclHistory.c
  626.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclHistory.c
  627.  
  628. tclIndexObj.o: $(GENERIC_DIR)/tclIndexObj.c
  629.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclIndexObj.c
  630.  
  631. tclInterp.o: $(GENERIC_DIR)/tclInterp.c
  632.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclInterp.c
  633.  
  634. tclIO.o: $(GENERIC_DIR)/tclIO.c
  635.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclIO.c
  636.  
  637. tclIOCmd.o: $(GENERIC_DIR)/tclIOCmd.c
  638.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclIOCmd.c
  639.  
  640. tclIOSock.o: $(GENERIC_DIR)/tclIOSock.c
  641.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclIOSock.c
  642.  
  643. tclIOUtil.o: $(GENERIC_DIR)/tclIOUtil.c
  644.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclIOUtil.c
  645.  
  646. tclLink.o: $(GENERIC_DIR)/tclLink.c
  647.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclLink.c
  648.  
  649. tclListObj.o: $(GENERIC_DIR)/tclListObj.c
  650.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclListObj.c
  651.  
  652. tclObj.o: $(GENERIC_DIR)/tclObj.c
  653.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclObj.c
  654.  
  655. tclLoad.o: $(GENERIC_DIR)/tclLoad.c
  656.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclLoad.c
  657.  
  658. tclLoadAix.o: $(UNIX_DIR)/tclLoadAix.c
  659.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclLoadAix.c
  660.  
  661. tclLoadAout.o: $(UNIX_DIR)/tclLoadAout.c
  662.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclLoadAout.c
  663.  
  664. tclLoadDl.o: $(UNIX_DIR)/tclLoadDl.c
  665.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclLoadDl.c
  666.  
  667. tclLoadDl2.o: $(UNIX_DIR)/tclLoadDl2.c
  668.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclLoadDl2.c
  669.  
  670. tclLoadDld.o: $(UNIX_DIR)/tclLoadDld.c
  671.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclLoadDld.c
  672.  
  673. tclLoadNone.o: $(GENERIC_DIR)/tclLoadNone.c
  674.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclLoadNone.c
  675.  
  676. tclLoadOSF.o: $(UNIX_DIR)/tclLoadOSF.c
  677.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclLoadOSF.c
  678.  
  679. tclLoadShl.o: $(UNIX_DIR)/tclLoadShl.c
  680.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclLoadShl.c
  681.  
  682. tclMain.o: $(GENERIC_DIR)/tclMain.c
  683.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclMain.c
  684.  
  685. tclMtherr.o: $(UNIX_DIR)/tclMtherr.c
  686.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclMtherr.c
  687.  
  688. tclNamesp.o: $(GENERIC_DIR)/tclNamesp.c
  689.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclNamesp.c
  690.  
  691. tclNotify.o: $(GENERIC_DIR)/tclNotify.c
  692.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclNotify.c
  693.  
  694. tclParse.o: $(GENERIC_DIR)/tclParse.c
  695.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclParse.c
  696.  
  697. tclPipe.o: $(GENERIC_DIR)/tclPipe.c
  698.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclPipe.c
  699.  
  700. tclPkg.o: $(GENERIC_DIR)/tclPkg.c
  701.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclPkg.c
  702.  
  703. tclPosixStr.o: $(GENERIC_DIR)/tclPosixStr.c
  704.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclPosixStr.c
  705.  
  706. tclPreserve.o: $(GENERIC_DIR)/tclPreserve.c
  707.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclPreserve.c
  708.  
  709. tclProc.o: $(GENERIC_DIR)/tclProc.c
  710.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclProc.c
  711.  
  712. tclStringObj.o: $(GENERIC_DIR)/tclStringObj.c
  713.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclStringObj.c
  714.  
  715. tclUtil.o: $(GENERIC_DIR)/tclUtil.c
  716.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclUtil.c
  717.  
  718. tclVar.o: $(GENERIC_DIR)/tclVar.c
  719.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclVar.c
  720.  
  721. tclTest.o: $(GENERIC_DIR)/tclTest.c
  722.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclTest.c
  723.  
  724. tclTestObj.o: $(GENERIC_DIR)/tclTestObj.c
  725.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclTestObj.c
  726.  
  727. tclTimer.o: $(GENERIC_DIR)/tclTimer.c
  728.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclTimer.c
  729.  
  730. tclUnixChan.o: $(UNIX_DIR)/tclUnixChan.c
  731.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclUnixChan.c
  732.  
  733. tclUnixEvent.o: $(UNIX_DIR)/tclUnixEvent.c
  734.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclUnixEvent.c
  735.  
  736. tclUnixFCmd.o: $(UNIX_DIR)/tclUnixFCmd.c
  737.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclUnixFCmd.c
  738.  
  739. tclUnixFile.o: $(UNIX_DIR)/tclUnixFile.c
  740.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclUnixFile.c
  741.  
  742. tclUnixNotfy.o: $(UNIX_DIR)/tclUnixNotfy.c
  743.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclUnixNotfy.c
  744.  
  745. tclUnixPipe.o: $(UNIX_DIR)/tclUnixPipe.c
  746.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclUnixPipe.c
  747.  
  748. tclUnixSock.o: $(UNIX_DIR)/tclUnixSock.c
  749.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclUnixSock.c
  750.  
  751. tclUnixTest.o: $(UNIX_DIR)/tclUnixTest.c
  752.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclUnixTest.c
  753.  
  754. tclUnixTime.o: $(UNIX_DIR)/tclUnixTime.c
  755.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclUnixTime.c
  756.  
  757. tclUnixInit.o: $(UNIX_DIR)/tclUnixInit.c tclConfig.sh
  758.     $(CC) -c $(CC_SWITCHES) -DTCL_LIBRARY=\"${TCL_LIBRARY}\" \
  759.         -DTCL_PACKAGE_PATH="\"${TCL_PACKAGE_PATH}\"" \
  760.         $(UNIX_DIR)/tclUnixInit.c
  761.  
  762. # compat binaries
  763.  
  764. fixstrtod.o: $(COMPAT_DIR)/fixstrtod.c
  765.     $(CC) -c $(CC_SWITCHES) $(COMPAT_DIR)/fixstrtod.c
  766.  
  767. getcwd.o: $(COMPAT_DIR)/getcwd.c
  768.     $(CC) -c $(CC_SWITCHES) $(COMPAT_DIR)/getcwd.c
  769.  
  770. opendir.o: $(COMPAT_DIR)/opendir.c
  771.     $(CC) -c $(CC_SWITCHES) $(COMPAT_DIR)/opendir.c
  772.  
  773. strncasecmp.o: $(COMPAT_DIR)/strncasecmp.c
  774.     $(CC) -c $(CC_SWITCHES) $(COMPAT_DIR)/strncasecmp.c
  775.  
  776. strstr.o: $(COMPAT_DIR)/strstr.c
  777.     $(CC) -c $(CC_SWITCHES) $(COMPAT_DIR)/strstr.c
  778.  
  779. strtod.o: $(COMPAT_DIR)/strtod.c
  780.     $(CC) -c $(CC_SWITCHES) $(COMPAT_DIR)/strtod.c
  781.  
  782. strtol.o: $(COMPAT_DIR)/strtol.c
  783.     $(CC) -c $(CC_SWITCHES) $(COMPAT_DIR)/strtol.c
  784.  
  785. strtoul.o: $(COMPAT_DIR)/strtoul.c
  786.     $(CC) -c $(CC_SWITCHES) $(COMPAT_DIR)/strtoul.c
  787.  
  788. tmpnam.o: $(COMPAT_DIR)/tmpnam.c
  789.     $(CC) -c $(CC_SWITCHES) $(COMPAT_DIR)/tmpnam.c
  790.  
  791. waitpid.o: $(COMPAT_DIR)/waitpid.c
  792.     $(CC) -c $(CC_SWITCHES) $(COMPAT_DIR)/waitpid.c
  793.  
  794. .c.o:
  795.     $(CC) -c $(CC_SWITCHES) $<
  796.  
  797. #
  798. # Target to check for proper usage of UCHAR macro.
  799. #
  800.  
  801. checkuchar:
  802.     -egrep isalnum\|isalpha\|iscntrl\|isdigit\|islower\|isprint\|ispunct\|isspace\|isupper\|isxdigit\|toupper\|tolower $(SRCS) | grep -v UCHAR
  803.  
  804. #
  805. # Target to make sure that only symbols with "Tcl" prefixes are
  806. # exported.
  807. #
  808.  
  809. checkexports: $(TCL_LIB_FILE)
  810.     -nm -p $(TCL_LIB_FILE) | awk '$$2 ~ /[TDB]/ { print $$3 }' | sort -n | grep -v '^[Tt]cl'
  811.  
  812. #
  813. # Target to create a proper Tcl distribution from information in the
  814. # master source directory.  DISTDIR must be defined to indicate where
  815. # to put the distribution.
  816. #
  817.  
  818. DISTNAME =    tcl@TCL_VERSION@@TCL_PATCH_LEVEL@
  819. ZIPNAME =    tcl@TCL_MAJOR_VERSION@@TCL_MINOR_VERSION@@TCL_PATCH_LEVEL@.zip
  820. DISTDIR =    /proj/tcl/dist/$(DISTNAME)
  821. $(UNIX_DIR)/configure: $(UNIX_DIR)/configure.in
  822.     autoconf $(UNIX_DIR)/configure.in > $(UNIX_DIR)/configure
  823. dist: $(UNIX_DIR)/configure
  824.     rm -rf $(DISTDIR)
  825.     mkdir $(DISTDIR)
  826.     mkdir $(DISTDIR)/unix
  827.     cp -p $(UNIX_DIR)/*.c $(UNIX_DIR)/*.h $(DISTDIR)/unix
  828.     rm -f $(DISTDIR)/unix/bp.c $(DISTDIR)/unix/tclXtNotify.c
  829.     cp $(UNIX_DIR)/Makefile.in $(DISTDIR)/unix
  830.     chmod 664 $(DISTDIR)/unix/Makefile.in
  831.     cp $(UNIX_DIR)/configure $(UNIX_DIR)/configure.in \
  832.         $(UNIX_DIR)/tclConfig.sh.in $(UNIX_DIR)/install-sh \
  833.         $(UNIX_DIR)/porting.notes $(UNIX_DIR)/porting.old \
  834.         $(UNIX_DIR)/README $(UNIX_DIR)/ldAix \
  835.         $(DISTDIR)/unix
  836.     chmod 775 $(DISTDIR)/unix/configure $(DISTDIR)/unix/configure.in
  837.     chmod 775 $(DISTDIR)/unix/ldAix
  838.     chmod +x $(DISTDIR)/unix/install-sh
  839.     tclsh $(UNIX_DIR)/mkLinks.tcl \
  840.         $(UNIX_DIR)/../doc/*.[13n] > $(DISTDIR)/unix/mkLinks
  841.     chmod +x $(DISTDIR)/unix/mkLinks
  842.     mkdir $(DISTDIR)/generic
  843.     cp -p $(GENERIC_DIR)/*.c $(GENERIC_DIR)/*.h $(DISTDIR)/generic
  844.     cp -p $(GENERIC_DIR)/README $(DISTDIR)/generic
  845.     cp -p $(GENERIC_DIR)/tclGetDate.y $(DISTDIR)/generic
  846.     cp -p $(TOP_DIR)/changes $(TOP_DIR)/README $(TOP_DIR)/license.terms \
  847.         $(DISTDIR)
  848.     mkdir $(DISTDIR)/library
  849.     cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/library/*.tcl \
  850.         $(TOP_DIR)/library/tclIndex $(DISTDIR)/library
  851.     for i in http2.0 http1.0 opt0.1; \
  852.         do \
  853.         mkdir $(DISTDIR)/library/$$i ;\
  854.         cp -p $(TOP_DIR)/library/$$i/*.tcl $(DISTDIR)/library/$$i; \
  855.         done;
  856.     mkdir $(DISTDIR)/doc
  857.     cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/doc/*.[13n] \
  858.         $(TOP_DIR)/doc/man.macros $(DISTDIR)/doc
  859.     mkdir $(DISTDIR)/compat
  860.     cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/compat/*.c \
  861.         $(TOP_DIR)/compat/*.h $(TOP_DIR)/compat/README \
  862.         $(DISTDIR)/compat
  863.     mkdir $(DISTDIR)/tests
  864.     cp -p $(TOP_DIR)/license.terms $(DISTDIR)/tests
  865.     cp -p $(TOP_DIR)/tests/*.test $(TOP_DIR)/tests/README \
  866.         $(TOP_DIR)/tests/all $(TOP_DIR)/tests/remote.tcl \
  867.         $(TOP_DIR)/tests/defs $(DISTDIR)/tests
  868.     mkdir $(DISTDIR)/win
  869.     cp -p $(TOP_DIR)/win/*.c $(TOP_DIR)/win/*.h $(TOP_DIR)/win/*.rc \
  870.         $(DISTDIR)/win
  871.     cp -p $(TOP_DIR)/win/makefile.* $(DISTDIR)/win
  872.     cp -p $(TOP_DIR)/win/README $(DISTDIR)/win
  873.     cp -p $(TOP_DIR)/win/pkgIndex.tcl $(DISTDIR)/win
  874.     cp -p $(TOP_DIR)/license.terms $(DISTDIR)/win
  875.     mkdir $(DISTDIR)/mac
  876.     sccs edit -s $(TOP_DIR)/mac/tclMacProjects.sit.hqx
  877.     cp -p tclMacProjects.sit.hqx $(DISTDIR)/mac
  878.     sccs unedit $(TOP_DIR)/mac/tclMacProjects.sit.hqx
  879.     rm -f tclMacProjects.sit.hqx
  880.     cp -p $(TOP_DIR)/mac/*.c $(TOP_DIR)/mac/*.h $(TOP_DIR)/mac/*.r \
  881.         $(DISTDIR)/mac
  882.     cp -p $(TOP_DIR)/mac/porting.notes $(TOP_DIR)/mac/README $(DISTDIR)/mac
  883.     cp -p $(TOP_DIR)/mac/*.exp $(TOP_DIR)/mac/*.pch $(DISTDIR)/mac
  884.     cp -p $(TOP_DIR)/mac/*.doc $(DISTDIR)/mac
  885.     cp -p $(TOP_DIR)/mac/*.html $(DISTDIR)/mac
  886.     cp -p $(TOP_DIR)/license.terms $(DISTDIR)/mac
  887.     mkdir $(DISTDIR)/unix/dltest
  888.     cp -p $(UNIX_DIR)/dltest/*.c $(UNIX_DIR)/dltest/Makefile.in \
  889.         $(DISTDIR)/unix/dltest
  890.     cp -p $(UNIX_DIR)/dltest/configure.in $(UNIX_DIR)/dltest/configure \
  891.         $(UNIX_DIR)/dltest/README $(DISTDIR)/unix/dltest
  892.  
  893. alldist: dist
  894.     rm -f /proj/tcl/dist/$(DISTNAME).tar.Z \
  895.         /proj/tcl/dist/$(DISTNAME).tar.gz \
  896.         /proj/tcl/dist/$(ZIPNAME)
  897.     cd /proj/tcl/dist; tar cf $(DISTNAME).tar $(DISTNAME); \
  898.         gzip -9 -c $(DISTNAME).tar > $(DISTNAME).tar.gz; \
  899.         compress $(DISTNAME).tar; zip -r8 $(ZIPNAME) $(DISTNAME)
  900.  
  901. #
  902. # Target to create a Macintosh version of the distribution.  This will
  903. # do a normal distribution and then massage the output to prepare it
  904. # for moving to the Mac platform.  This requires a few scripts and
  905. # programs found only in the Tcl group's tool workspace.
  906. #
  907.  
  908. macdist: dist
  909.     rm -f $(DISTDIR)/mac/tclMacProjects.sit.hqx
  910.     tclsh $(TOOL_DIR)/man2html.tcl $(DISTDIR)/tmp ../.. tcl$(VERSION)
  911.     mv $(DISTDIR)/tmp/tcl$(VERSION) $(DISTDIR)/html
  912.     rm -rf $(DISTDIR)/doc
  913.     rm -rf $(DISTDIR)/tmp
  914.     tclsh $(TOOL_DIR)/cvtEOL.tcl $(DISTDIR)
  915.  
  916. #
  917. # Targets to build Solaris package of the distribution for the current
  918. # architecture.  To build stream packages for both sun4 and i86pc
  919. # architectures: 
  920. #
  921. #   On the sun4 machine, execute the following:
  922. #     make distclean; ./configure
  923. #     make DISTDIR=<distdir> package
  924. #
  925. #   Once the build is complete, execute the following on the i86pc
  926. #   machine:
  927. #     make DISTDIR=<distdir> package-quick
  928. #
  929. # <distdir> is the absolute path to a directory where the build should
  930. # take place.  These steps will generate the SUNWtcl.sun4 and
  931. # SUNWtcl.i86pc stream packages.  It is important that the packages be
  932. # built in this fashion in order to ensure that the architecture
  933. # independent files are exactly the same, including timestamps, in
  934. # both packages.
  935. #
  936.  
  937. package: dist package-config package-common package-binaries package-generate
  938. package-quick: package-config package-binaries package-generate
  939.  
  940. #
  941. # Configure for the current architecture in the dist directory.
  942. #
  943. package-config:
  944.     mkdir -p $(DISTDIR)/unix/`arch`
  945.     cd $(DISTDIR)/unix/`arch`; \
  946.         ../configure --prefix=/opt/SUNWtcl/$(VERSION) \
  947.         --exec_prefix=/opt/SUNWtcl/$(VERSION)/`arch` \
  948.         --enable-shared
  949.     mkdir -p $(DISTDIR)/SUNWtcl/$(VERSION)
  950.     mkdir -p $(DISTDIR)/SUNWtcl/$(VERSION)/`arch`
  951.  
  952. #
  953. # Build and install the architecture independent files in the dist directory.
  954. #
  955.  
  956. package-common:
  957.     cd $(DISTDIR)/unix/`arch`;\
  958.     $(MAKE); \
  959.     $(MAKE) prefix=$(DISTDIR)/SUNWtcl/$(VERSION) \
  960.         exec_prefix=$(DISTDIR)/SUNWtcl/$(VERSION)/`arch` \
  961.         install-libraries install-man
  962.     mkdir -p $(DISTDIR)/SUNWtcl/$(VERSION)/bin
  963.     sed -e "s/TCLVERSION/$(VERSION)/g" < $(UNIX_DIR)/tclsh.sh \
  964.         > $(DISTDIR)/SUNWtcl/$(VERSION)/bin/tclsh$(VERSION)
  965.     chmod 755 $(DISTDIR)/SUNWtcl/$(VERSION)/bin/tclsh$(VERSION)
  966.  
  967. #
  968. # Build and install the architecture specific files in the dist directory.
  969. #
  970.  
  971. package-binaries: 
  972.     cd $(DISTDIR)/unix/`arch`; \
  973.     $(MAKE); \
  974.     $(MAKE) install-binaries prefix=$(DISTDIR)/SUNWtcl/$(VERSION) \
  975.         exec_prefix=$(DISTDIR)/SUNWtcl/$(VERSION)/`arch`
  976.  
  977. #
  978. # Generate a package from the installed files in the dist directory for the
  979. # current architecture.
  980. #
  981.  
  982. package-generate:
  983.     pkgproto $(DISTDIR)/SUNWtcl/$(VERSION)/bin=bin \
  984.          $(DISTDIR)/SUNWtcl/$(VERSION)/include=include \
  985.          $(DISTDIR)/SUNWtcl/$(VERSION)/lib=lib \
  986.          $(DISTDIR)/SUNWtcl/$(VERSION)/man=man \
  987.          $(DISTDIR)/SUNWtcl/$(VERSION)/`arch`=`arch` \
  988.     | tclsh $(UNIX_DIR)/mkProto.tcl \
  989.         $(VERSION) $(UNIX_DIR) > prototype
  990.     pkgmk -o -d . -f prototype -a `arch`
  991.     pkgtrans -s . SUNWtcl.`arch` SUNWtcl
  992.     rm -rf SUNWtcl
  993.  
  994. # DO NOT DELETE THIS LINE -- make depend depends on it.
  995.